﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Miris.HumanMilkAnalyser.DataModel;

namespace Miris.HumanMilkAnalyser.Repository.EntityFramework.Mapping
{
    public class UnassignedSampleNumberMap : EntityTypeConfiguration<UnassignedSampleNumber>
    {
        public UnassignedSampleNumberMap()
        {
            // Primary Key
            this.HasKey(t => t.SampleNumber);

            // Properties
            this.Property(t => t.SampleNumber)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("UnassignedSampleNumber");
            this.Property(t => t.SampleNumber).HasColumnName("SampleNumber");
            this.Property(t => t.GenerateDate).HasColumnName("GenerateDate");
        }
    }
}
